﻿@model PagedList<LTSMZ.life.Model.Product>
           @using Webdiyer.WebControls.Mvc

@{
    ViewBag.Title = "goods_Show";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<link href="~/Content/BootstrapSouce/css/bootstrap.min.css" rel="stylesheet" />
<script src="~/Content/BootstrapSouce/js/jquery.min.js"></script>
<script src="~/Content/BootstrapSouce/js/bootstrap.min.js"></script>
<style>
    .table{
        font-size: large;
        font-family: 宋体;
    }
</style>
<script>
    function Add()
    {
        location.href = "/Home/goods_add"
    }
</script>
<button class="btn btn-lg btn-info" onclick="Add()"><span class="glyphicon glyphicon-plus">添加</span></button>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">
            商品操作
            <img src="C:/Users/Administrator/Desktop/FG/LTSMZ.life.UI/Upload/(77).jpg" />
        </h3>
    </div>
    <div class="panel-body">
        <table border="1" class="table table-bordered table-hover table-striped" >
            <tr>
                <td>商品编号</td>
                <td>商品名称</td>
                <td>商品库存</td>
                <td>商品价格</td>
                <td>商品规格</td>
                <td>商品说明</td>
                <td>商品产地</td>
                <td>商品上下架</td>
                <td>类别</td>
                <td>操作</td>
            </tr>
            @foreach (var item in Model)
            {
                <tr>
                    <td>@item.Pid</td>
                    <td>@item.Pname</td>
                    <td>@item.AvailableStocks</td>
                    <td>@item.Price 元/1  </td>
                    <td>@item.Specification</td>
                    <td>@item.Explain</td>
                    <td>@item.Place</td>
                    <td>
                        @if (Convert.ToInt32(@item.ProState) == 1)
                        {
                            <span>上架</span>
                        }
                        else
                        {
                            <span>下架</span>
                        }
                    </td>
                    <td>@item.Sname</td>
                    <td><a style="text-decoration:none" href="/Home/AlterProduct1/@item.Pid" class="glyphicon glyphicon-edit">修改状态</a><a style="text-decoration:none" href="/PImg/PImg_Add/@item.Pid" class="glyphicon glyphicon-picture">添加图片介绍</a></td>
                </tr>
            }
        </table>
        </div>
    </div>
        @Html.Pager(Model, new PagerOptions { PageIndexParameterName = "pageIndex" })
